package com.gln.bloger.pojos;

import java.util.Date;

public class Category extends Entity{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String id;
	
	private String name;

	private String description;

	private Date createTime;

	private Boolean secret;

	private int count;
	
	private  Website website;

	public Website getWebsite() {
		return website;
	}

	public void setWebsite(Website website) {
		this.website = website;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public Boolean getSecret() {
		return secret;
	}

	public void setSecret(Boolean secret) {
		this.secret = secret;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Category() {
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("id:").append(getId()).append(" name:").append(name).append(
				" description:").append(description);
		return sb.toString();
	}

	@Override
	public String getId() {
		return id;
	}

	@Override
	public void setId(String id) {
		this.id = id;
	}

	@Override
	public void setData(Entity other) {
		Category otherCategory = (Category)other;
		this.count = otherCategory.getCount();
		this.createTime = otherCategory.getCreateTime();
		this.description = otherCategory.getDescription();
		this.id = otherCategory.getId();
		this.name = otherCategory.getName();
		this.secret = otherCategory.getSecret();
	}

}
